﻿namespace SDT.ServiceSystem
{
    /// <summary>
    /// Defined by SinhNT
    /// </summary>
    public interface IWorkerThread
    {
        int Id { get; }
        string Name { get; set; }

        string ConnectionString { get; }

        void DoWork();

        void StartWorking();
        bool StopWorking();

        int Interval { get; }
        int WorkUnitInterval { get; }

        IWorkUnit GetWork();
        void AddWork(IWorkUnit newWork);
        void ClearWork();
        bool HaveWork { get; }
        int WorkSize { get; }

        WorkResultHandlerDelegate ResultHandler { set; }
    }
}